import request from "@/utils/request";


export function page(cus,page,pageSize) {
    return request({
        url: '/admin/getCustomer?'+'page='+page+'&pageSize='+pageSize,
        method: 'post',
        data:cus
    })
}
export function changeCustomer(cus) {
    return request({
        url: '/admin/updateCustomer',
        method: 'post',
        data:cus
    })
}

export function deleteCustomer(id) {
    return request({
        url: '/admin/deleteCustomer?id='+id,
        method: 'delete'
    })
}

export function addCustomer(cus) {
    return request({
        url: '/admin/addCustomer',
        method: 'post',
        data:cus
    })
}



export function login(user) {
    return request({
        url: '/login',
        method: 'post',
        data:user
    })
}
export function getInfo() {
    return request({
        url: '/getInfo',
        method: 'get',
    })
}

export function save(customer) {
    return request({
        url: '/admin/addCustomer',
        method: 'post',
        data:customer,
    })
}



